package cn.fy.erupt.model.work;

import javax.persistence.*;

import xyz.erupt.annotation.*;
import xyz.erupt.annotation.sub_erupt.*;
import xyz.erupt.annotation.sub_field.*;
import xyz.erupt.annotation.sub_field.sub_edit.*;
import xyz.erupt.upms.model.base.HyperModel;
import xyz.erupt.jpa.model.BaseModel;
import java.util.Set;
import java.util.Date;

@Erupt(name = "工作日报项")
@Table(name = "t_work_daily_item")
@Entity
public class DailyItem extends HyperModel {

        @EruptField(
                views = @View(
                        title = "产品名称"
                ),
                edit = @Edit(
                        title = "产品名称",
                        type = EditType.INPUT, search = @Search, notNull = true,
                        inputType = @InputType,
                        placeHolder = "请输入产品名称"
                )
        )
        private String productName;

        @EruptField(
                views = @View(
                        title = "产量"
                ),
                edit = @Edit(
                        title = "产量",
                        type = EditType.NUMBER, notNull = true,
                        numberType = @NumberType(min=0, max=99999999),
                        placeHolder = "请输入产量"
                )
        )
        private Double num;

        @EruptField(
                views = @View(
                        title = "备注",
                        width = "200px"
                ),
                edit = @Edit(
                        title = "备注",
                        type = EditType.TEXTAREA,
                        placeHolder = "请输入备注"
                )
        )
        private @Lob String remark;
        
        @ManyToOne
        @EruptField
        @JoinColumn(name = "daily_id")
        private Daily daily;

}
